<template>
  <div>
    <!-- 今日，流量概括 -->
    <div class="card flow">
      <div class="flow-list flex">
        <div class="today-box" style="width: 100%">
          <h4>今日概括</h4>
          <div class="today-list flex">
            <div class="count-item" @click="navigateTo('orderList')">
              <div class="icon">
                <Icon size="31" type="md-reorder" />
              </div>
              <div>
                <div>订单数</div>
                <div class="counts">{{ homeData.todayOrderNum || 0 }}</div>
              </div>
            </div>
            <div class="count-item">
              <div class="icon">
                <Icon size="31" type="md-cart" />
              </div>
              <div>
                <div>交易额</div>
                <div class="counts">
                  <span v-if="homeData.todayOrderPrice"
                    >焕贝{{ homeData.todayOrderPrice | unitPrice }}</span
                  >
                  <span v-else>焕贝0.00</span>
                </div>
              </div>
            </div>
            <div class="count-item" @click="navigateTo('shopList')">
              <div class="icon">
                <Icon size="32" type="ios-archive" />
              </div>
              <div>
                <div>新增店铺</div>
                <div class="counts">{{ homeData.todayStoreNum || 0 }}</div>
              </div>
            </div>
            <div class="count-item" @click="navigateTo('managerGoods')">
              <div class="icon">
                <Icon size="31" type="md-photos" />
              </div>
              <div>
                <div>上架商品数量</div>
                <div class="counts">{{ homeData.todayGoodsNum || 0 }}</div>
              </div>
            </div>
            <div class="count-item">
              <div class="icon">
                <Icon size="31" type="md-photos" />
              </div>
              <div>
                <div>合伙人数量</div>
                <div class="counts">{{ homeData.todayPartnerNum || 0 }}</div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- 统计 -->
    <div class="card">
      <h4>会员数量</h4>
      <div class="count-list flex">
        <div class="count-item" @click="navigateTo('memberList')">
          <div class="icon">
            <Icon size="31" type="ios-people" />
          </div>
          <div>
            <div>C端会员数</div>
            <div class="counts">{{ homeData.memberCNum || 0 }}</div>
          </div>
        </div>
        <div class="count-item">
          <div class="icon">
            <Icon size="31" type="ios-people" />
          </div>
          <div>
            <div>合伙人数</div>
            <div class="counts">{{ homeData.partnerNum || 0 }}</div>
          </div>
        </div>
        <div class="count-item">
          <div class="icon">
            <Icon size="31" type="md-card" />
          </div>
          <div>
            <div>金卡</div>
            <div class="counts">{{ homeData.memberJkNum || 0 }}</div>
          </div>
        </div>
        <div class="count-item">
          <div class="icon">
            <Icon size="31" type="md-card" />
          </div>
          <div>
            <div>银卡</div>
            <div class="counts">{{ homeData.memberYkNum || 0 }}</div>
          </div>
        </div>
        <div class="count-item">
          <div class="icon">
            <Icon size="31" type="md-card" />
          </div>
          <div>
            <div>普通</div>
            <div class="counts">{{ homeData.memberPtNum || 0 }}</div>
          </div>
        </div>
      </div>
    </div>
    <!-- 合伙人 -->
    <div class="card">
      <h4>合伙人</h4>
      <div class="count-list flex">
        <div class="count-item" @click="navigateTo('user-partnerB')">
          <div class="icon">
            <Icon size="31" type="ios-people" />
          </div>
          <div>
            <div>天使-B 下辖会员</div>
            <div class="counts">{{ homeData.memberTianShiBNum || 0 }}</div>
          </div>
        </div>
        <div class="count-item" @click="navigateTo('user-partner')">
          <div class="icon">
            <Icon size="31" type="ios-people" />
          </div>
          <div>
            <div>天使 下辖会员</div>
            <div class="counts">{{ homeData.memberTianShiNum || 0 }}</div>
          </div>
        </div>
        <div class="count-item" @click="navigateTo('cause-parther')">
          <div class="icon">
            <Icon size="31" type="ios-people" />
          </div>
          <div>
            <div>事业 下辖会员</div>
            <div class="counts">{{ homeData.memberShiYeNum || 0 }}</div>
          </div>
        </div>
        <div class="count-item" @click="navigateTo('city-partner')">
          <div class="icon">
            <Icon size="31" type="ios-people" />
          </div>
          <div>
            <div>城市合伙人 下辖会员</div>
            <div class="">
              <span>c端：{{ homeData.chengShicduan || 0 }} </span>
              <span style="margin-left: 10px">B端：{{ homeData.chengShiBDuan || 0 }}</span>
              <span style="margin-left: 10px">天使：{{ homeData.chengShiTShi || 0 }}</span>
              <span style="margin-left: 10px">事业：{{ homeData.chengShiSye || 0 }}</span>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- 关于店铺 -->
    <div class="card">
      <h4>关于店铺</h4>
      <div class="count-list flex">
        <div class="count-item" @click="navigateTo('shopList')">
          <div class="icon">
            <Icon size="31" type="ios-archive" />
          </div>
          <div>
            <div>店铺总数</div>
            <div class="counts">{{ homeData.storeNum || 0 }}</div>
          </div>
        </div>
        <div class="count-item" @click="navigateTo('managerGoods')">
          <div class="icon">
            <Icon size="31" type="md-photos" />
          </div>
          <div>
            <div>商品总数</div>
            <div class="counts">{{ homeData.goodsNum || 0 }}</div>
          </div>
        </div>
        <div class="count-item" @click="navigateTo('orderList')">
          <div class="icon">
            <Icon size="31" type="md-reorder" />
          </div>
          <div>
            <div>订单总量</div>
            <div class="counts">{{ homeData.orderNum || 0 }}</div>
          </div>
        </div>
      </div>
    </div>
    <!-- 今日待办 -->
    <div class="card" style="display: none">
      <h4>今日待办</h4>
      <div class="todo-list flex">
        <div class="todo-item" @click="navigateTo('applyGoods')">
          <div class="counts">{{ $store.state.notices.goods || 0 }}</div>
          <div>待审核商品</div>
        </div>
        <div class="todo-item" @click="navigateTo('shopAuth')">
          <div class="counts">{{ $store.state.notices.store || 0 }}</div>
          <div>待审核店铺</div>
        </div>
        <div class="todo-item" @click="navigateTo('orderComplaint')">
          <div class="counts">{{ $store.state.notices.complain || 0 }}</div>
          <div>待审核投诉</div>
        </div>
        <div class="todo-item" @click="navigateTo('afterSaleOrder')">
          <div class="counts">{{ $store.state.notices.refund || 0 }}</div>
          <div>待审核售后</div>
        </div>
        <!--     <div class="todo-item">
          <div class="counts">{{$store.state.notices.distributionCash|| 0}}</div>
          <div>待审核分佣提现</div>
        </div> -->
        <div class="todo-item" @click="navigateTo('accountStatementBill')">
          <div class="counts">{{ $store.state.notices.waitPayBill || 0 }}</div>
          <div>待审核分账</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    homeData: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  methods: {
    // 路由跳转
    navigateTo(name) {
      this.$router.push({
        name,
      });
    },
  }
};
</script>
<style lang="scss" scoped>
@import "../home.scss";
</style>
